<template>
	<view class="box">
		<view class="imgf">
			<image src="../../static/logo.png" mode="" class="img"></image>
		</view>
		<view class="input">
			<u--input placeholder="请输入手机号" border="" v-model="value"></u--input>
			<u--input placeholder="请输入密码" border="" v-model="value1" style="margin-top: 25rpx;"
				v-if="cnm==0"></u--input>
			<u--input placeholder="请输入验证码" border="" v-model="value1" style="margin-top: 25rpx;" v-if="cnm==1">

			</u--input>
			<view style="margin-top: 60rpx;">
				<u-button text="登录" size="normal"  shape="circle" type="error"></u-button>
			</view>
		</view>
		<view class="login">
			<view class="" v-if="cnm==0" @click="dxclick">短信验证码登录</view>
			<view class="" v-if="cnm==1" @click="number">手机号码登录</view>
			<view class="" @click="register">注册账号</view>
		</view>
		<u-divider text="其他登录方式" lineColor="gray"></u-divider>
		<view class="signin">
			<view class="">
				<image src="../../static/logo.png" mode="" class="signin-img"></image>
				<view class="">微信登录</view>
			</view>
		</view>
		<view class="read">
			已阅读并同意
			<text class="service">《服务协议》</text>
			和
			<text class="service">《隐私协议》</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cnm: 0,
				value: '',
				value1: ''
			};
		},
		methods: {
			dxclick() {
				this.cnm = 1
			},
			number() {
				this.cnm = 0
			},
			//跳转注册账号
			register() {
				uni.navigateTo({
					url: '/pages/register/register'
				})
			}
		}
	}
</script>

<style lang="scss">
	.service {
		color: red;

	}

	.input {
		margin-top: 60rpx;
	}

	.box {
		margin-left: 25rpx;
		margin-right: 25rpx;
	}

	.imgf {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 60rpx;
	}

	.img {
		width: 180rpx;
		height: 180rpx;

	}

	.login {
		display: flex;
		justify-content: space-between;
		margin-top: 50rpx;
		font-size: 35rpx;
		color: gray;
	}

	.signin {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-top: 50rpx;
	}

	.signin-img {
		border-radius: 50%;
		width: 120rpx;
		height: 120rpx;
	}

	.read {
		text-align: center;
		margin-top: 320rpx;
	}
</style>